# -*- coding=utf-8 -*-

import sqlite3
import threading
from major_tools import *

class major_thread(threading.Thread):

    def __init__(self, key, keep_path, delete_cache = False):
        threading.Thread.__init__(self)
        self.key = key
        self.conn = sqlite3.connect(f'./cache/{key}.db')
        self.keep_path = keep_path
        self.delete_cache = delete_cache
        self.init_cache()

    def init_cache(self):
        sql1 = 'CREATE TABLE if not exists choose(kw text, name text unique , url text unique )'
        self.conn.execute(sql1)
        sql2 = 'CREATE TABLE if not exists '

    def close_sql(self):
        self.conn.close()

    def run(self):


class download_thread(threading.Thread):

    def __init__(self, download_list):
        threading.Thread.__init__(self)
        self.queue = download_list
